//
//  SnatchRecordsTableViewCell.m
//  lmq
//
//  Created by 马田成 on 2017/4/5.
//  Copyright © 2017年 yuanxin. All rights reserved.
//

#import "SnatchRecordsTableViewCell.h"
#import "SnatchRecsssordsModel.h"
#import "UIImageView+WebCache.h"


@implementation SnatchRecordsTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setModelOfSnatch:(SnatchRecsssordsModel *)modelOfSnatch{
//    NSString *strPic = @"http://lmq.quyum.cn/";
//    
//    NSString *str = [strPic stringByAppendingString:modelOfSnatch.pic];
//    
    NSString *urlWare=modelOfSnatch.pic;
    NSString *str=manage(AP_HOST, urlWare);
    NSString *strUrl = [str stringByReplacingOccurrencesOfString:@"\\" withString:@"/"];
    
    [self.picImage sd_setImageWithURL:[NSURL URLWithString:strUrl]];
   
    self.nameLabel.text = modelOfSnatch.shop_name;
    self.qiHaoLabel.text = modelOfSnatch.stage;
    self.numberLabel.text = [NSString stringWithFormat:@"%ld", (long)modelOfSnatch.num];
    
    if (modelOfSnatch.status == 1) {
        self.statusLabel.text = @"已开奖";
    }else {
    
        self.statusLabel.text = @"未开奖";
        
    }
    
   

}
@end
